<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>POS收单运营管理平台</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link href="<s:url value="/css/a.css"/>" type="text/css"
	rel="stylesheet" />
<link href="<s:url value="/css/index.css"/>" type="text/css"
	rel="stylesheet" />


<script type="text/javascript"
	src="<s:url value="/js/jquery-1.9.1.min.js" />"></script>
<script type="text/javascript"
	src="<s:url value="/js/jquery.validate.min.js" />"></script>
<script type="text/javascript"
	src="<s:url value="/js/pwms.validate.js?v13" />"></script>
<script language="javascript" type="text/javascript"
	src="<s:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>

<style type="text/css">
.fieldError {
	color: red;
	text-align: left;
}

.error {
	float: none;
	color: red;
	padding-left: .5em;
	vertical-align: top;
}

table th {
	font-weight: bolder;
	text-align: left;
	background-color: #5599FF;
}
</style>
<script type="text/javascript">
var interval;
var timeOver = 120;
	$(document).ready(function() {
		//alert("dd");
		/* $.validator.setDefaults({
			submitHandler : function(form) {
				form.submit();
			}
		}); 
		$.validator.setDefaults({
			debug : true
		});*/
		$("#operatorsForm").validate({
		
			debug : true,
			submitHandler : function(form) {
			
				form.submit();
			},
			
			rules : {
				"operators.accountNo" : {
					required : true,
					stringCheck :true
				},
				"operators.mobile" : {
					required : true,
					isMobile : true
				},
				
				"operators.cardType" : {
					required : true
				},
				"operators.realName" : {
					required : true
				},
				
				
				"operators.address" : {
					required : true
				},
				
				"operators.email" : {
					email : true
				},
				"operators.cardNo" : {
					required : true
				}

			},
			messages : {
				"operators.accountNo" : "商户编号必填且只能是英文字母或数字",
				"operators.mobile" : "手机号必须输入",
				"operators.realName" : "商户真实名必填",
				"operators.cardType" : "证件类型必填",
				"operators.cardNo" : "证件号必填",
				
				"operators.email" : "请输入有效的Email地址",
				
				
				"operators.address" : "请输入详细地址"
				
			},
			onsubmit : true,
			invalidHandler : function(event, validator) {
				alert("您的输入信息不完整或者不符合要求，请检查后重新输入");

			}

		});
		
	});
	
</script>

</head>

<body>
	
		<div class="subpage">
			<s:form namespace="/tidRecord" action="addTidRecord.ct" method="post"
				cssClass="cmxform" id="operatorsForm" theme="simple">
				<div class="user_title">
					<h2 class="headline-inquires">
						POS收单运营管理平台<br />
						<span class="sub-title"></span>
					</h2>
				</div>
				<table width="100%" border="1" cellspacing="0" class="table">
					<tr>
						<td colspan="4" align="center">

							<h2 class="headline-inquires">
								终端使用情况录入<br />
								<span class="sub-title"></span>
							</h2>
						</td>
					</tr>
					<tr>
						<th colspan="4">终端基本信息</th>
					</tr>
			
					<tr>
					    <td align="right" width="15%">申请类型：</td>
					    <td width="35%">
					    <s:select id="askType" name="tidRecord.askType" list="#{'1':'申请','2':'退回' }" cssClass="queryWidth" />
					    </td>
					
						<td align="right" width="15%">申请人姓名：</td>
						<td width="35%"><s:textfield cssClass="queryWidth"
								id="accountNo" name="tidRecord.askName" maxlength="30"></s:textfield>
							<font color="red">*</font> <span id="testDIV"></span></td>
						
					</tr>
					
					<tr>
					    <td align="right" width="15%">手机号：</td>
						<td width="35%"><s:textfield cssClass="queryWidth"
								id="phone" name="tidRecord.phone" maxlength="11"></s:textfield>
							<font color="red">*</font>
					    </td>
					    
					
					     <td align="right" width="15%">品牌：</td>
						<td>
							<s:select cssClass="queryWidth" name="tidRecord.posBrand"
								id="posBrand"
								list="#request.brandMap" listKey="key" listValue="value" />
						</td>
					
					</tr>
                 
					<tr>
						
						<td align="right" width="15%">机型：</td>
						<td>
							<s:select cssClass="queryWidth" name="tidRecord.posType"
								id="posType"
								list="#request.typeMap" listKey="key" listValue="value" />
						</td>
						
						<td align="right" width="15%">名称：</td>
						<td>
							<s:select cssClass="queryWidth" name="tidRecord.posName"
								id="posName"
								list="#request.nameMap" listKey="key" listValue="value" />
						</td>

					</tr>
					<tr>
						<td align="right">SIM卡号：</td>
						<td><s:textfield cssClass="queryWidth"
								name="tidRecord.simNo" maxlength="20" /><font
							color="red">*</font></td>
						<td align="right"></td>
						<td></td>
					</tr>
	
					<tr>
						<td align="right">备注：</td>
						<td colspan="3"><s:textarea rows="5" cssClass="someWidth" 
								name="tidRecord.remark" /></td>
					</tr>
					
					<tr>
						<td colspan="4" align="center"><span style="font-color: red"><s:actionerror /></span>
							<span style="font-color: red;"><s:actionmessage /></span > <span style="font-color: red;"><s:fielderror
									cssClass="fieldError" /></span>
							<span id="otherError"></span>
						</td>
					</tr>
					<tr>
						<td align="center" colspan="4">
						       <s:submit id="btnAdd" value="保  存" /> &nbsp;&nbsp; 
								<input type="reset"" value="取  消"/>
						</td>
					</tr>
					<tr>
						<td colspan="4" align="center">&nbsp;</td>
					</tr>
				</table>

			</s:form>
		</div>
	
<s:if test="#request.msg !=null">
		<script language="javascript">
		alert("${request.msg}");
			window.location="<%=basePath%>/tidRecord/tidRecordAddJsp.ct";
			
		</script>
	</s:if>	
</body>
</html>
